.TH "flash_helper.c" 3 "Wed Sep 16 2015" "Doxygen" \" -*- nroff -*-
.ad l
.nh
.SH NAME
flash_helper.c \- 
.SH SYNOPSIS
.br
.PP
\fC#include 'flash_helper\&.h'\fP
.br
\fC#include 'ch\&.h'\fP
.br
\fC#include 'hal\&.h'\fP
.br
\fC#include 'stm32f4xx_conf\&.h'\fP
.br
\fC#include 'utils\&.h'\fP
.br
\fC#include 'mcpwm\&.h'\fP
.br
\fC#include 'hw\&.h'\fP
.br
\fC#include <string\&.h>\fP
.br

.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBFLASH_SECTORS\fP   12"
.br
.ti -1c
.RI "#define \fBBOOTLOADER_BASE\fP   11"
.br
.ti -1c
.RI "#define \fBAPP_BASE\fP   0"
.br
.ti -1c
.RI "#define \fBNEW_APP_BASE\fP   8"
.br
.ti -1c
.RI "#define \fBNEW_APP_SECTORS\fP   3"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_0\fP   ((uint32_t)0x08000000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_1\fP   ((uint32_t)0x08004000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_2\fP   ((uint32_t)0x08008000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_3\fP   ((uint32_t)0x0800C000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_4\fP   ((uint32_t)0x08010000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_5\fP   ((uint32_t)0x08020000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_6\fP   ((uint32_t)0x08040000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_7\fP   ((uint32_t)0x08060000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_8\fP   ((uint32_t)0x08080000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_9\fP   ((uint32_t)0x080A0000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_10\fP   ((uint32_t)0x080C0000)"
.br
.ti -1c
.RI "#define \fBADDR_FLASH_SECTOR_11\fP   ((uint32_t)0x080E0000)"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "uint16_t \fBflash_helper_erase_new_app\fP (uint32_t new_app_size)"
.br
.ti -1c
.RI "uint16_t \fBflash_helper_write_new_app_data\fP (uint32_t offset, uint8_t *data, uint32_t len)"
.br
.ti -1c
.RI "void \fBflash_helper_jump_to_bootloader\fP (void)"
.br
.in -1c
.SH "Macro Definition Documentation"
.PP 
.SS "#define ADDR_FLASH_SECTOR_0   ((uint32_t)0x08000000)"

.SS "#define ADDR_FLASH_SECTOR_1   ((uint32_t)0x08004000)"

.SS "#define ADDR_FLASH_SECTOR_10   ((uint32_t)0x080C0000)"

.SS "#define ADDR_FLASH_SECTOR_11   ((uint32_t)0x080E0000)"

.SS "#define ADDR_FLASH_SECTOR_2   ((uint32_t)0x08008000)"

.SS "#define ADDR_FLASH_SECTOR_3   ((uint32_t)0x0800C000)"

.SS "#define ADDR_FLASH_SECTOR_4   ((uint32_t)0x08010000)"

.SS "#define ADDR_FLASH_SECTOR_5   ((uint32_t)0x08020000)"

.SS "#define ADDR_FLASH_SECTOR_6   ((uint32_t)0x08040000)"

.SS "#define ADDR_FLASH_SECTOR_7   ((uint32_t)0x08060000)"

.SS "#define ADDR_FLASH_SECTOR_8   ((uint32_t)0x08080000)"

.SS "#define ADDR_FLASH_SECTOR_9   ((uint32_t)0x080A0000)"

.SS "#define APP_BASE   0"

.SS "#define BOOTLOADER_BASE   11"

.SS "#define FLASH_SECTORS   12"

.SS "#define NEW_APP_BASE   8"

.SS "#define NEW_APP_SECTORS   3"

.SH "Function Documentation"
.PP 
.SS "uint16_t flash_helper_erase_new_app (uint32_t new_app_size)"

.SS "void flash_helper_jump_to_bootloader (void)"
Stop the system and jump to the bootloader\&. 
.SS "uint16_t flash_helper_write_new_app_data (uint32_t offset, uint8_t * data, uint32_t len)"

.SH "Author"
.PP 
Generated automatically by Doxygen from the source code\&.
